package com.game.springbootstart.mapper;

import com.game.springbootstart.entity.Admin;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.game.springbootstart.entity.Games;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 员工信息 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2025-02-09
 */
@Mapper
public interface AdminMapper extends BaseMapper<Admin> {
    @Select("select * from admin where username = #{username}")
    Admin getByUsername(String username);

    @Select("select * from game.admin where username=#{name} ")
    Admin listByName(String name);

    @Select("select * from game.admin where id=#{id} ")
    Admin listById(Long id);

    @Select("select role from game.admin where id = #{id}")
    List<String> selectRole(Long id);
}

